<%--
  Created by IntelliJ IDEA.
  User: Tcm
  Date: 2021/7/5
  Time: 12:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>新用户注册</title>
    <style>
        body {
            background-color: #6e81e2;
        }
        #cont div {
            text-align: center;
            padding: 15px;
            color: #305f66;
        }
        #cont div:last-child input:first-child {
            margin-right: 30px;
        }
        #cont div:last-child input:last-child {
            margin-left: 30px;
        }
    </style>
    <script>
        function resetForm() {
            document.forms[0].reset();
        }
    </script>
</head>
<body>
<div>
    <jsp:include page="pages/top.jsp"/>
    <div id="cont">
        <%
            Object messge = request.getAttribute("message");
            System.out.println(messge);
            if (messge != null){
        %>
        <h3 style="color:red;text-align: center">出错信息：${message}</h3>
        <%
            }
        %>
        <form action="<%=request.getContextPath()%>/loginServlet?type=register" method="post" name="myForm1">
            <div>
                <%--@declare id="username"--%>
                <label for="userName">
                    用户名:
                    <input type="text" name="userName" />
                </label>
            </div>
            <div>
                <label >
                    密&emsp;码:
                    <input type="password" name="pwd" />
                </label>
            </div>
            <div>
                <input type="button" value="登录" onclick="location='pages/login.jsp'">
                <input type="submit" value="注册" onclick="">
                <input type="button" onclick="resetForm()" value="重置">
            </div>
        </form>
    </div>
    <jsp:include page="pages/bottom.jsp"/>
</div>
</body>
</html>
